//
//  DNApiConst.swift
//  LunalerApp
//
//  Created by 露乐ios on 2018/3/12.
//  Copyright © 2018年 露乐ios. All rights reserved.
//

import Foundation


class DNApiForGetUserProfile: DNApiBaseRequest {
    
    override func loadRequest() {
        super.loadRequest()
        self.method = .get
        self.path = "/api/daogoubao/user/getDaogou"
        self.modelClass = DNDaoGouProfileBaseResponseModel.self
        self.headers = ["Authorization":dnNullStrable(str: DNUserContext.sharedInstance.token ?? "") as String];
        self.parameters = [:]
    }
    
//    eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJJRCI6IjIzMTk3YTIyLWRjMmYtNDY2OC05Y2ZkLWIwMjAxMGFlM2IzYyIsIlRlbmFudElkIjoxLCJVc2VySWQiOjgwNjE4MjgyLCJNZW1iZXJJZCI6ODA2MTg0NzIsIkF2YXRhciI6Imh0dHBzOi8vc3RhdGljLm1hbW1hc2F5LmNvbS9pbWFnZS8yMDE3MTIyOC82MzY1MDA1OTI5NzA3NzMzODM4MzU3ODc5LmpwZyIsIlJlYWxOYW1lIjoi5rWL6K-V5Y-36IOh5biF56eRIiwiTmlja05hbWUiOiJaRiIsIlBob25lIjoiMTg5NzAwNzcyNTYiLCJTZXNzaW9uS2V5IjpudWxsfQ.Z7Bp_wfVYa92WNo_DSzOyhHYcVJFkC55GsxGWbW4P3E
    
//eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJJRCI6IjQ4MTkzMDZiLTM2ZTQtNDY5Yi04MDMwLTQ0YThhMGU2ZWRmNyIsIlRlbmFudElkIjowLCJVc2VySWQiOjgwNjE4MjgyLCJNZW1iZXJJZCI6MCwiQXZhdGFyIjoiaHR0cHM6Ly9zdGF0aWMubWFtbWFzYXkuY29tL2ltYWdlLzIwMTcxMjI4LzYzNjUwMDU5Mjk3MDc3MzM4MzgzNTc4NzkuanBnIiwiUmVhbE5hbWUiOiLmtYvor5Xlj7fog6HluIXnp5EiLCJOaWNrTmFtZSI6IlpGIiwiUGhvbmUiOiIxODk3MDA3NzI1NiIsIlNlc3Npb25LZXkiOm51bGx9.uMAWnkXwH-l0wkeCsrTz-5HcaFK5rw2zcOgovEFpn2o
}

class DNApiForReSetPWD: DNApiBaseRequest {
    override func loadRequest() {
        super.loadRequest()
        self.method = .post
        self.path = "/api/base/account/settingPwd"
        self.modelClass = DNCommonModel.self
        
    }
    
    init(newPwd:NSString,oldPwd:NSString) {
        super.init()
        self.NewPassword = newPwd as String
        let hashedPasswordInfo = newPwd.appending(DNAppContext.shareInstance.kSaltStr) as NSString
        self.NewPassword = hashedPasswordInfo.md5() as String
        
        self.OldPassword = oldPwd as String
        let hashedOldPasswordInfo = oldPwd.appending(DNAppContext.shareInstance.kSaltStr) as NSString
        self.OldPassword = hashedOldPasswordInfo.md5() as String
    }
    
    var OldPassword = ""
    var NewPassword = ""
    
    
}


